package com.foreknow.polymorphism;

/**
 * @author shkstart
 * @create 2021-07-26 17:02
 */
public class Duck extends Animal {
    private String name;
    private int legNum;

    public Duck(String name, int legNum) {
        this.name=name;
        this.legNum=legNum;
    }

    public String getName() {
        return name;
    }


    public int getLegNum() {
        return legNum;
    }

    @Override
    public String shout() {
        return "嘎嘎嘎";
    }
}
